package io.hepu.robotize.util;

import org.springframework.lang.Nullable;

import java.lang.annotation.Annotation;

public class JAnnotation {

    public static <T extends Annotation> T ifPresent(Class<?> clazz, @Nullable Class<T> annotationType) {
        if (annotationType == null) {
            return null;
        }
        return clazz.getAnnotation(annotationType);
    }

}
